<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/produits.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateServiceTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="6">
                    <h:outputLabel value="#{bundle.CreateServiceLabel_nomService}" for="nomService" />
                    <p:inputText id="nomService" required="true" value="#{serviceController.selected.nomService}" title="#{bundle.CreateServiceTitle_nomService}" />
                    <p:message for="nomService"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_reference}" for="reference" />
                    <p:inputText id="reference" value="#{serviceController.selected.reference}" title="#{bundle.CreateServiceTitle_reference}" />
                    <p:message for="reference"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_categorieService}" for="categorieService" />
                    <p:selectOneMenu id="categorieService" value="#{serviceController.selected.categorieService}" title="#{bundle.CreateServiceTitle_categorieService}" >
                        <f:selectItems value="#{categorieServiceController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="categorieService"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_etatAchat}" for="etatAchat" />
                    <p:selectOneMenu id="etatAchat" value="#{serviceController.selected.etatCommercial}" title="#{bundle.CreateServiceTitle_etatAchat}" >
                        <f:selectItems value="#{etatCommercialController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="etatAchat"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_description}" for="description" />
                    <p:inputText id="description" value="#{serviceController.selected.description}" title="#{bundle.CreateServiceTitle_description}" />
                    <p:message for="description"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_informationFacture}" for="informationFacture" />
                    <p:inputText id="informationFacture" value="#{serviceController.selected.informationFacture}" title="#{bundle.CreateServiceTitle_informationFacture}" />
                    <p:message for="informationFacture"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_paysOrigine}" for="paysOrigine" />
                    <p:selectOneMenu id="paysOrigine" value="#{serviceController.selected.paysOrigine}" title="#{bundle.CreateServiceTitle_paysOrigine}" >
                        <f:selectItems value="#{paysController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="paysOrigine"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_codeDouane}" for="codeDouane" />
                    <p:inputText id="codeDouane" value="#{serviceController.selected.codeDouane}" title="#{bundle.CreateServiceTitle_codeDouane}" />
                    <p:message for="codeDouane"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_prixAchat}" for="prixAchat" />
                    <p:inputText id="prixAchat" value="#{serviceController.selected.prixAchat}" title="#{bundle.CreateServiceTitle_prixAchat}" />
                    <p:message for="prixAchat"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_tvaAchat}" for="tvaAchat" />
                    <p:selectOneMenu id="tvaAchat" value="#{serviceController.selected.tvaAchat}" title="#{bundle.CreateServiceTitle_tvaAchat}" >
                        <f:selectItems value="#{tVAController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="tvaAchat"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_prixVente}" for="prixVente" />
                    <p:inputText id="prixVente" value="#{serviceController.selected.prixVente}" title="#{bundle.CreateServiceTitle_prixVente}" />
                    <p:message for="prixVente"/>
                    <h:outputLabel value="#{bundle.CreateServiceLabel_tvaVente}" for="tvaVente" />
                    <p:selectOneMenu id="tvaVente" value="#{serviceController.selected.tvaVente}" title="#{bundle.CreateServiceTitle_tvaVente}" >
                        <f:selectItems value="#{tVAController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="tvaVente"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{serviceController.create}" value="#{bundle.CreateServiceSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{serviceController.prepareList}" value="#{bundle.CreateServiceShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
